From e119c75123b7513c5c29960c0772088a93df2208 Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 22 Jan 2007 17:59:41 +0000 Subject: [PATCH] Improve Garmin error case for Windows USB exclusive error failure to point finger at Spanner and GPSGate-like substances. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@2628 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/jeeps/gpsusbwin.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gpsbabel/jeeps/gpsusbwin.c b/gpsbabel/jeeps/gpsusbwin.c index 1fe48959f..368ae63e4 100644 --- a/gpsbabel/jeeps/gpsusbwin.c +++ b/gpsbabel/jeeps/gpsusbwin.c @@ -161,6 +161,11 @@ HANDLE * garmin_usb_start(HDEVINFO* hdevinfo, SP_DEVICE_INTERFACE_DATA *infodata usb_handle = CreateFile(pdd->DevicePath, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL ); if (usb_handle == INVALID_HANDLE_VALUE) { + if (GetLastError() == ACCESS_DENIED) { + warning( +"Exclusive access is denied. It's likely that something else such as\n" +"Nroute, Spanner, Google Earth, or GPSGate already has control of the device\n"); + } GPS_Serial_Error("(usb) CreateFile on '%s' failed", pdd->DevicePath); return NULL; } -- 2.30.2